1. Field of the Invention
The present invention relates generally to the recording of data onto optical media, and more particularly to a method for determining actual system audio decoding speed in preparation for commencing a recording operation to prevent buffer under-runs.
2. Description of the Related Art
When recording audio data to optical media, the source audio data is typically in a compressed form that must be decompressed or decoded during the recording process. The proliferation of consumer use of the Internet has opened access to a vast resource of audio data that can be enjoyed from a source on the web, and can be downloaded to allow consumer creation of custom CD""s for home, office, and car stereo use, as well as the ability to assemble large personal libraries of one""s favorite audio recordings. In order for audio files, typically very large files, to be successfully transmitted, the files are compressed or encoded for data transmission, and then decompressed or decoded by a consumer""s computer for playback or to record or burn to optical media.
When recording is desired, selected audio data is typically retrieved by a CD recording engine of a host computer system. The recording engine reads data from a source which can be, for example, a source on the Internet, the host system hard disk drive, a local network, or another CD drive. The audio data is then decoded, transferred to a faster access buffer memory, and then continuously recorded onto one or more tracks of an optical disc during a recording session. However, as recording rates for optical discs have increased beyond 4xc3x97 (1xc3x97 being defined as normal music playback speed), the rate of recording onto the optical disc frequently exceeds the rate at which the recording engine can replenish data in the buffer memory. Although increasing processor speeds and other system improvements and enhancements increase the rate of data transfer to buffer memory, system resource availability and consumption decrease the rate of data transfer in a time-share environment. By way of example, the process of decoding audio data consumes system resources, as does the incidence of other applications running at the same time as the audio recording software application. The rate of data transfer from the source to the audio decoder can also impact the rate of data transfer from the audio decoder to the buffer memory. Therefore, the capability of the recording device to burn audio to optical media often exceeds the capability of the recording engine to transfer audio data to buffer memory.
A buffer under-run occurs when the buffer memory is unable to continuously provide data for an uninterrupted recording of the files to a given track of the optical disc. Eventually, after the buffer under-run occurs, the burning stops. With the technological advancements being realized in CD recording devices, the recording speed continues to increase. This leads to increased likelihood of buffer under-run during the recording of audio data due to the large file size and the requirement that audio must be decoded during the recording process. Data files, conversely, containing text and some images are generally small enough that they don""t require compression and decompression.
The consequences of one or more buffer under-runs during recording to an optical disc depend on the type of optical disc used during the recording. A CD-R optical disc can only undergo one recording, and the inaccessible remaining files typically cause the CD-R optical disc to be scrapped and replaced by a fresh CD-R optical disc for a repeated recording. A CD-RW optical disc can be written to multiple times, since the optical disc can be erased and the recording can be repeated. However, the repeating of recording sessions can take considerable time, especially if the recording is of a large track. Furthermore, regardless of whether the optical disc is CD-R or CD-RW, another buffer under-run can occur during the repeated recording session, causing the loss of the time spent on the recording session, if not the entire optical disc (in the case of CD-R optical discs).
The CD recording engine can be programmed to compensate for the slower data transfer to buffer memory by slowing the recording speed of the recording device so that the recording device is not depleting the buffer faster than the recording engine can replenish it. There is, however, no method in the prior art to accurately determine the optimum recording speed to match the rate of depletion of data from the buffer with the rate of replenishment. Any modification of the recording speed is nothing more than an operator guess that can eventually result in finding a speed at which discs are not ruined or time lost, but will never optimize the recording speed as described above.
FIG. 1 illustrates a block diagram 100 of a typical audio recording operation. A CD recording application 110, for example Easy CD Creator from Adaptec, Inc. of Milpitas, Calif., initiates a recording process. The CD recording engine 130 performs the tasks necessary to send selected audio data through CD recording circuitry to a selected CD recording device 150. As described above, the audio data is read from a source, e.g., a source disk, and decoded or decompressed by an audio decoder 120. The decoded audio to be recorded is then sent to a buffer for the CD recording device 150 and then read from the buffer and burned to a destination audio CD. As described above, the speed at which the CD recording engine 130 can send audio data to the buffer for the CD recording device 150 cannot be faster than the rate of data decoding in the audio decoder 120. The process of decoding data itself slows the data transfer rate by consuming system resources, and the rate of data transfer to the buffer can also be slowed by other system resource demands. In FIG. 1, the audio recording configuration 100 is shown with such factors as available CPU resources 140a, available memory resources 140b, and the performance capabilities of the source disk 140c, all impacting the performance of the CD recording engine 130. When combined with the audio decompression in the audio decoder 120, these factors can significantly impact the rate of audio data transfer to the buffer for the CD recording device 150. Further, this impact changes with changes in, for example, system configuration, source of audio data, and the kinds and numbers of other applications running on the host computer system.
In view of the foregoing, there is a need for a method for the recording of audio data to optical media that optimizes the recording speed of the recording device to accommodate for audio decoding, system configuration, and other system demands. The method should provide a recording system with a system-specific determination of data transfer that can be changed with changes in system configuration and/or resource demands, and allow the CD recording engine to modify the recording speed as necessary. This method should be configured to avoid the problems of the prior art.
Broadly speaking, the present invention fills these needs by providing a method for recording audio files to optical media that optimizes the recording speed of a CD recording device in accordance with the rate at which the CD recording engine can supply data to a buffer for the CD recording device. The present invention can be implemented in numerous ways, including as a process, an apparatus, a system, a device, a method, or a computer readable media. Several embodiments of the present invention are described below.
In one embodiment, a method for the recording of data to optical media is disclosed. The method includes the determination of a length of a single audio file, the measuring of an amount of time required to decode the single audio file, and the calculation of a codec decoding factor. The codec decoding factor is equal to the length of the single audio file divided by the amount of time required to decode the single audio file. Using the codec decoding factor, a recording speed is set for a CD recording device.
In another embodiment, a method for recording data to optical media is disclosed. The method includes the determining of a length of a single audio file. The method then provides for a test burn of the single audio file without recording data to the optical media. During the test burn, an amount of time required to decode the single audio file is measured. Once the file is decoded, a codec decoding factor is calculated which is equal to the length of the single audio file divided by the time required to decode the single audio file during the test burn.
In still a further embodiment, a method for recording data to optical media is disclosed. The method begins with the determination of a length of a single audio file. The method then calls for the determination of a system configuration factor of a host computer system. The method then calculates a codec decoding factor equal to the length of the single audio file divided by the time required to decode the single audio file. An optimized codec decoding factor is produced by multiplying the system configuration factor by the codec decoding factor.
The advantages of the present invention are numerous. One notable benefit and advantage of the invention is that buffer under-run can be minimized or avoided in the recording of audio to CD or other optical media. As described above, the increasing speed capabilities of recording devices does not take into account the rate at which the CD recording engine can supply data to a buffer for the CD recording device. The present invention provides a plurality of methods by which the CD recording engine can determine a rate at which data can be supplied to a buffer of a CD recording device, and then use that rate to set the recording speed for the selected recording device. By matching the recording speed of the optical media recording device to the rate at which data can be supplied to the buffer for the CD recording device, buffer under-run is avoided.
Other advantages of the invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.